Interface for extending functionality of memory cards

ABSTRACT

An enhanced flash memory card, including a flash memory card, including a wireless modem for downloading remote directory listings, and media files and steams over the Internet, and a memory partitioned into physical data storage clusters, and a driver for the flash memory card (i) for managing a file allocation table (FAT) that stores information about physical and virtual data storage clusters, the FAT including stub files for remote directory listings and remote media files and streams, wherein the stub files link to virtual data clusters, (ii) for managing a download conversion map from virtual cluster numbers to pointers of remote media files and streams, and (iii) for storing downloaded directory listings and media files and streams in the physical data storage clusters. A method is also described and claimed.

PRIORITY REFERENCE TO RELATED APPLICATIONS

This application claims benefit of U.S. Provisional Application No. 60/901,353, entitled INTERFACE FOR EXTENDING FUNCTIONALITY OF MEMORY CARDS, filed on Feb. 13, 2007 by inventor Itay Sherman.

FIELD OF THE INVENTION

The present invention relates to flash memory cards.

BACKGROUND OF THE INVENTION

Most CE and mobile computing devices today support addition of flash memory storage cards in the forms of SD, MiniSD, MicroSD and MMC, to expand memory capabilities of the devices. Access to such expansion memory cards is generally based on a file system and a standard access protocol that conforms to the SD or MMC specifications.

SUMMARY OF THE DESCRIPTION

The present invention is used to extend the functionality of SD cards, beyond the local storage functionality that is currently provided. Using the present invention, SD cards can provide wired or wireless communication channels to access remote content servers, and can stream content from, upload content to and download content from these servers.

Using the present invention, SD cards can also include applications that are controlled and displayed by the host device, and implemented on the CD card.

The SD cards of the present invention are compatible with existing SD physical and logical interfaces, and operate transparently with host devices that include SD slots.

There is thus provided in accordance with an embodiment of the present invention an enhanced flash memory card, including a flash memory card, including a wireless modem for downloading remote directory listings, and media files and streams over the Internet, and a memory partitioned into physical data storage clusters, and a driver for the flash memory card (i) for managing a file allocation table (FAT) that stores information about physical and virtual data storage clusters, the FAT including stub files for remote directory listings and remote media files and streams, wherein the stub files link to virtual data clusters, (ii) for managing a download conversion map from virtual cluster numbers to pointers of remote media files and streams, and (iii) for storing downloaded directory listings and media files and streams in the physical data storage clusters.

There is additionally provided in accordance with an embodiment of the present invention a method for remote file access using flash memory, including issuing a read request from a host device to a flash memory file system, the flash memory being represented as a plurality of physical and virtual data storage clusters, wherein the read request is addressed to a virtual data cluster, reading a stub file from a physical data cluster of the flash memory that corresponds to the virtual data cluster, identifying a URL that corresponds to the virtual data cluster, receiving remote file data from the URL, and storing the remote file data in physical data clusters of the flash memory.

There is further provided in accordance with an embodiment of the present invention a method for file upload using flash memory, including issuing a write request from a host device to a flash memory file system, the flash memory being represented as a plurality of physical and virtual data storage clusters, wherein the write request is to a directory represented as a stub file in the virtual storage, re-directing the write request to a physical cluster that holds an outgoing directory, writing the file content to a file created in the outgoing directory, sending the created file from the outgoing directory to a designated remote server, and removing the file from the physical storage and from being listed in the outgoing directory listing, after completion of the sending.

There is yet further provided in accordance with an embodiment of the present invention a method for file management, including implementing a file system that includes (i) visible physical sectors, (ii) hidden physical sectors, and (iii) virtual sectors, wherein visible physical sectors are mapped to the file system, hidden physical sectors are not mapped to the file system, and virtual sectors are not resident in a physical memory, mapping a virtual sector to a hidden sector in response to a read or a write command to the virtual sector, prior to performing the read or write command, and performing at least one auxiliary action in response to the read or a write command to the virtual sector.

There is moreover provided in accordance with an embodiment of the present invention an enhanced flash memory card, including a flash memory card, including a memory, and a wireless modem for downloading remote directory listings, and media files and steams over the Internet, and a driver for the flash memory card for managing a system of files and directories in the memory, and for invoking an auxiliary action directed to the wireless modem, wherein the auxiliary action is associated with a designated directory.

There is additionally provided in accordance with an embodiment of the present invention an enhanced flash memory card, including a flash memory card, including a memory, and a media player, and a driver for the flash memory card for managing a system of files and directories in the memory, and for invoking an auxiliary action directed to said media player, wherein the auxiliary action is associated with a designated directory.

There is further provided in accordance with an embodiment of the present invention a method for embedding a wireless modem in a flash memory card, including managing a system of files and directories in a flash card memory storage, generating an AT modem command in response to receiving a write command to a file within a designated directory, comprising copying text specified in the file write command for inclusion in the associated AT command, and issuing the AT modem command for a wireless modem embedded within the flash card.

There is yet further provided in accordance with an embodiment of the present invention a method for embedding a media player in a flash memory card, including managing a system of files and directories in a flash card memory storage, generating a media player command in response to receiving a command to open a file within a designated directory, wherein the media player command corresponds to the name of the file, and issuing the media player modem command to a media player embedded within the flash card.

BRIEF DESCRIPTION OF THE DRAWINGS

The present invention will be more fully understood and appreciated from the following detailed description, taken in conjunction with the drawings in which:

FIG. 1 is a simplified diagram of a prior art SD card interface;

FIG. 2 is a simplified diagram of an SD card interface that provides extended functionality, in accordance with the present invention;

FIG. 3 is a simplified illustration of an arrangement of clusters in an SD card file system, in accordance with an embodiment of the present invention;

FIG. 4 is a simplified flowchart of a method for downloading a file from a remote server to an SD card, in accordance with an embodiment of the present invention;

FIG. 5A is a snapshot of a user interface and a file system for a simplified example use case of file downloading, at a stage where a user is browsing a remote directory, in accordance with an embodiment of the present invention;

FIG. 5B is a snapshot of a user interface and a file system for a simplified example use case of file downloading, at a stage where a user is issuing a request to download a file from a remote server, in accordance with an embodiment of the present invention;

FIG. 5C is a snapshot of a user interface and a file system for a simplified example use case of file downloading, at a stage where a file from a remote server is being downloaded, in accordance with an embodiment of the present invention;

FIG. 5D is a snapshot of a user interface and a file system for a simplified example use case of file downloading, at a stage where download of a file from a remote server is complete, in accordance with an embodiment of the present invention;

FIG. 6 is a simplified flowchart of a method for generating a stub file, in accordance with an embodiment of the present invention;

FIG. 7 is a simplified flowchart of a method for playing a streamed file from an SD card, in accordance with an embodiment of the present invention;

FIG. 8 is an illustration of file streaming using a circular cluster cycle in the FAT, in accordance with an embodiment of the present invention;

FIG. 9 is a simplified flowchart of a method for uploading a file from an SD card to a remote server, in accordance with an embodiment of the present invention;

FIG. 10A is a snapshot of a user interface and a file system for a simplified example use case of file uploading, at a stage where a user is selecting a file to upload to a remote server, in accordance with an embodiment of the present invention; and

FIG. 10B is a snapshot of a user interface and a file system for a simplified example use case of file uploading, at a stage where a file is being uploaded to a remote server, in accordance with an embodiment of the present invention.

DETAILED DESCRIPTION

The present invention concerns an improved SD memory card that provides extended functionality, including (i) wired or wireless communication channels for accessing remote content servers, and (ii) applications that are controlled and displayed by an SD host device, but are implemented on the SD card. Using the improved SD memory card of the present invention, a device such as an MP3 or MP4 player, can stream music or video from remote content servers, download files from these servers, and upload files to these servers.

Reference is now made to FIG. 1, which is a simplified diagram of a prior art SD card interface. Shown in FIG. 1 is a host device 100 having an SD slot, and a conventional SD card 110 that can be inserted in the SD slot. A channel 120 enables data communication between host device 100 and SD card 110. Channel 120 also enables SD card 110 to receive electrical power from host device 100.

Host device 100 includes a CPU 130 that is software-controlled to process an SD instruction stack. Host device 100 also includes an SD driver 140.

SD card 120 includes an SD slave controller 150, for accessing a file system that is stored on flash memory 160.

Reference is now made to FIG. 2, which is a simplified diagram of an SD card interface that provides extended functionality, in accordance with the present invention. Shown in FIG. 2 is the same host device 100 as in FIG. 1, and an enhanced SD card 210. Enhanced SD card 210 uses the same interface as standard SD card 110, and thus operates seamlessly with host device 100. Host device also includes an application 290 that performs the extended functionality enabled by enhanced SD card 210. Details of operation of application 290 are described hereinbelow with reference to FIG. 4.

Enhanced SD card 210 includes an SD slave controller 250 and flash memory 260. Slave controller 250 interfaces with host device 100 as a standard SD card, and provides information for a virtual file system. Improved SD card 210 includes a CPU 270 controlled by embedded software, and a communication modem 280 that interfaces with other devices and networks. Communication modem 280 may be inter alia a cellular modem, a WLAN modem, a WPAN modem, and a wireless modem.

The file and directory structure reported by slave controller 250 to host device 100 does not necessarily reflect files and directories that are stored an SD card 210. Directory names may represent names of remote servers accessible via communication modem 280, and they may represent names of services the SD card 210 provides. The operation of opening a directory by the host, signals CPU 270 to access a specific server or activate a specific service.

In accordance with the present invention, file names may represent names of files or streams that are stored remotely on a selected server. Opening a specific files triggers SD card 210 to access the remote file or stream and download it to the card. Immediate access to the file by the host is provided via a dummy copy of the file that may include a place holder message such as “file is currently being downloaded, download will be complete within xx seconds”. The place holder message may be provided in the form of an audio file, such as an MP3 or WMA file, or an image file, such as a JPEG of GIF file, depending on the type of file that was requested.

Writing a file to a designated location on SD card 210 operates to upload the file to the selected remote server.

In accordance with the present invention, file names may also be used to designate controls for applications that are executed on SD card 210. Opening of a file designates activation of a corresponding control.

For one usage scenario, SD card 210 may have a directory named “Radio”. Selection of this directory activates a radio on the card. In turn, the Radio directory includes a list of files with names “Search Forward”, “Search Backward”, “Volume Up” and “Volume Down”. Opening the “Search Forward” file, for example, activates an instruction to the radio to skip to the next channel.

For another usage scenario, host device 100 writes to a file in a directory named “ATComm”. In response, an AT command, which includes content written to the file, is issued to communication modem 280. Thus, if the host writes “ATZ” to the file, which is a reset command, the command is transmitted to communication modem 280. The modem reply, which is typically “OK”, is written to a second file in the ATComm directory, available for host device 100 to read.

For devices that support more advanced data formats such as HTML pages or Java applications, SD card 210 provides a graphical user interface via an HTML file or Java application file that is stored on the card. The host device opens and executes such file, e.g., main.html, which in turn provides a graphical representation for accessing remote files or for controlling an application on SD card 210. File content and HTML links are changed dynamically corresponding to changes in information or changes in status.

With the graphical user interface, control over SD card 210 is still performed by selecting, opening and writing to files, but the interface is graphical, as coded in the HTML file or Java application.

Implementation Details

As described hereinabove, directory names on SD card 210 may represent names of remote servers, and file names on SD card 210 may correspond to names of remote files and streams. Reference is now made to FIG. 3, which is a simplified illustration of an arrangement of clusters in an SD card file system, in accordance with an embodiment of the present invention. Shown in FIG. 3 is a flash memory in SSD card is represented as including 60 clusters, numbered consecutively from 1 to 60, although clusters 31-60 are virtual, non-physical clusters, as described in detail in what follows.

The physical memory on SD card 210 is generally partitioned into 512 byte sectors, and four sectors are combined to form a 2 KB cluster, although it will be appreciated by those skilled in the art that other partitions are within the scope of the present invention. In FIG. 3 the physical memory includes clusters 1-30. Information regarding available clusters on the SD card 210 is maintained in a file allocation table (FAT). For each cluster, two bytes are stored in the FAT, as follows.

0, if cluster is empty Next cluster in file, if cluster is not the last cluster in a file 0xFFF8, if cluster is the last cluster in a file 0xFFF7, if cluster is a bad cluster

Clusters 1-6 of FIG. 3 correspond to an MP3 file that is stored as a cluster chain. The first cluster in the chain is cluster 1, and the chain continues through clusters 2, 3, 4, 5 and 6, with cluster 6 being the last cluster in the file, designated as an EOF (end-of-file) cluster. The arrows drawn in these clusters represent pointers that advance through the chain of clusters. Clusters 7-9 of FIG. 3 correspond to an MP3 file that is currently being downloaded. As such, cluster 9 is not necessarily an EOF cluster since additional downloaded data may require additional clusters for storage. Similarly, clusters 26-28 correspond to a second MP3 file that is currently being downloaded. Clusters 23 and 24 correspond to an MP4 file that is currently being downloaded. Clusters 10-22 and 25, 29 and 30 are free clusters. The cross-hatching in the clusters of FIG. 3 corresponds to the type of cluster, as indicated in the FAT legend.

Information about files is stored in a directory, designated “ROOT DIRECTORY” in FIG. 3, having 32 byte directory entries generally including the following information.

File name with 8+3 characters Type—regular file, directory File size Date & time First cluster of file File names longer than 8+3 characters are obtained by including additional entries for the same file with special attributes. The directory itself is stored in the file system as a regular file.

In the implementation of the present invention illustrated in FIG. 3, the SD file system is extended by declaring the volume to be of a size larger than the amount of available physical flash memory. Host device 100 is not aware of the discrepancy since it never needs to write to the excess volume.

The extended volume includes physical clusters, which are mapped to real flash memory locations, and virtual clusters, which have addresses beyond the available flash memory. Cluster 1-30 in FIG. 3 are physical clusters, and clusters 31-60 are virtual clusters. Upon initialization, the virtual clusters may be marked as bad clusters in the FAT, thereby ensuing that host device 100 does not try to write to these clusters. More generally, when host device is powered up, the flash memory is reset by erasing all file entries in the root directory and clearing the FAT. Physical clusters are marked as being free clusters, and virtual clusters may be marked as being bad clusters.

Virtual clusters are converted to stub locations when they are read. Stub locations include a directory list stub and a media stub, such as an MP3 stub. A directory list stub includes a file with a place holder message such as “file is currently being downloaded, download will be complete within xx seconds”, as described hereinabove. A virtual cluster is mapped to an appropriate stub location in the flash memory in such a way that distinct virtual clusters correspond to distinct stub files.

Clusters 31 and 37 in FIG. 3 are directory list stubs. Clusters 44-46, clusters 50-52 and clusters 59-60 are media stubs. Media stubs are cluster chains that end at an EOF cluster. Clusters 44-46 and clusters 50-52 correspond to an MP3 stub, and cluster 59-60 corresponds to an MP4 stub. Clusters 32-36, 38-43, 47-49 and 53-58 are marked as bad clusters. It is noted that MP3 stubs are generally identical, since they generally contain the same place holder message. More generally, media stubs for a specific media type, such as MP3 stubs, IPG stubs or MP4 stubs, are identical.

The number of virtual clusters that are defined equals N*M, where N is the maximum number of concurrent stubs required, and M is the maximum number of clusters for stub data. Typically, one cluster is used for a directory list stub, and 50 clusters, corresponding to 100 KB, are used for a media stub. For simplicity, FIG. 3 is drawn with N=5 and M=6. In practice, reasonable values for N and M are 256 and 64, respectfully, and accordingly the number of virtual clusters is 2̂14. As such, the virtual clusters require 32 KB for their FAT entries.

A portion of the flash memory, designated in FIG. 3 as “STUB STORAGE AREA”, that contains M clusters is used to stub file data and is not mapped to the file system. Only SD controller 250 can access this storage area of the flash memory. The M clusters in the stub storage area are hidden clusters; specifically, they are physical clusters in the flash memory but they are not mapped directly on the FAT. When virtual clusters are read, the virtual cluster locations are converted to hidden cluster locations.

Stub files have valid directory entries, which point to virtual clusters as the first file cluster. All subsequent clusters in the stub files are also virtual clusters. Referring to FIG. 3, clusters 44-46, clusters 50-52 and clusters 59-60 are cluster chains for stub files. Each stub file points to a different virtual cluster, although they may contain the same stub data. Consequently, SD controller 250 knows which file to download based upon the virtual sector number requested by host device 100. Specifically, the hidden sector number to read from the stub storage area is V (mod 4M), where V is the virtual sector offset inside the virtual sector area. The term 4M arises from the 4 sectors per cluster. More generally, if there are K sectors per cluster, then the hidden sector number to read is V (mod K*M).

When a remote file or stream is downloaded, it is stored on SD card 210 in a FAT cluster chain, just as a local file is stored. However, the directory entry for the file does not point to the first cluster in the chain. A download map from virtual cluster number to {file name, file type, pointer to file on remote server, first real cluster} is used to maintain a list of all current stub files, including files in stub mode and files in downloading mode. Links that can be clicked on by a user have entries in the download map, along with a stub file directory entry with a file type of the form DIRECTORY, MP3, MP3_STREAM, or such other media type. When a file is finished being downloaded, it is removed from the download map.

Shown in FIG. 3 is a download map with entries for two directories and two MP3 files, corresponding to the stubs in the root directory. The MP3 files being downloaded are currently stored in clusters 7-9 and clusters 23 and 24.

Reference is now made to FIG. 4, which is a simplified flowchart of a method for downloading a file from a remote server to an SD card, in accordance with an embodiment of the present invention. To accompany FIG. 4, reference is also made to FIGS. 5A-5D, which are snapshots of a user interface and a file system for a simple example use case, during various stages of file download during operation of the method of FIG. 4. Each of FIGS. 5A-5D are divided into three portions. The leftmost portion illustrates a user interface, the middle portion illustrates directory entries and the download map, and the rightmost portion illustrates the FAT. Thus, whereas FIG. 4 describes the steps being performed, the accompanying FIGS. 5A-5D illustrate states of the user interface and the file system during various ones of the steps. The legends for the cross-hatching on the FATs in FIGS. 5A-5D are the same as the legend provided in FIG. 3. It will be appreciated by those skilled in the art that the file system illustrated in FIGS. 5A-5D is simplified, in order to emphasize the workings of an embodiment of the present invention.

Referring to FIG. 4, in general at step 405, application 290 analyzes a downloaded directory file for new stub files to create. The directory content is recursively searched by application 290. For each file discovered a directory listing stub or media stub is created, corresponding to the file type.

FIG. 5A corresponds to an initial stage wherein a user is browsing a downloaded remote directory listing, as shown in the leftmost portion of FIG. 5A. At this stage, the root directory has entries for two stub directories; namely, a “jazz” stub directory at virtual cluster 31, and a “rock” stub directory at virtual cluster 37. The root directory also has entries for two local files, namely, a movie stored at clusters 1-6, and a pop song stored at clusters 7-9. The download map has URL entries for two remote directories; namely, a “jazz” directory at virtual cluster 31 has URL http://music.com/jazz, and a “rock” directory at virtual cluster 37 has URL http://music.com/rock.

Reference is now made to FIG. 6, which is a simplified flowchart of a method for generating a stub file in step 405 of FIG. 4, in accordance with the present invention. At step 610, application 290 searches the virtual clusters in the FAT, such as clusters 31-60 in FIG. 5A, for the first free row; namely, the first row with clusters marked as bad clusters. At step 620 the first applicable cluster in the row found at step 610 is set as the first cluster of the stub file, according to the type of stub file. Specifically, for the example FAT shown in FIG. 3, the applicable cluster for directory list stubs is the first cluster in the row, for MP3 stubs is the second cluster in the row, and for MP4 stubs is the fifth cluster in the row. Such an arrangement ensures that the different types of stubs correspond to different hidden cluster in the sub storage area.

At step 630, application 290 allocates additional virtual clusters, as required for storing the stub file, and the additional virtual clusters are chained to the first virtual cluster. Such virtual cluster chains are shown in FIG. 5B as clusters 44-46 and clusters 50-52. Finally, at step 640, application 290 modifies the directory entry for the stub file, so that the first cluster of the stub file points to the first cluster from step 620, and so that the size of the stub file matches the actual length of the stub file.

At step 410, host device 100 refreshes and identifies the newly-downloaded directory listing. At step 415 a determination is made whether a file is to be downloaded. If so, processing advances to step 425. Otherwise, processing ends.

As shown in FIG. 5A, the user clicks on the “jazz” directory. Momentarily, a place holder message “downloading file list please wait” appears on the user interface. The place holder message is stored in the stub storage area, as shown in FIG. 3, in the hidden cluster corresponding to cluster 31. In the meantime, host device 100 downloads the remote file list for the “jazz” directory, and displays the list shown at the top of the leftmost portion of FIG. 5B. The list contains two files; namely, a “benny goodman” MP3 file, and a “louis armstrong” MP3 file.

At this stage, the root directory includes a local directory for the “jazz” directory at data cluster 13. A “jazz” directory is generated, and includes entries for two stub MP3 files; namely, a stub MP3 file at virtual cluster 44, and a stub MP3 file at virtual cluster 50. The download map includes URLs for the remote “benny goodman” and “louis armstrong” files. The user clicks on “benny goodman” to initiate download of that file.

Referring back to FIG. 4, in general at step 420 host device 100 issues a file read request to the SD file system. The request is transmitted to SD driver 140. SD driver determines from the FAT, which appropriate cluster to read, and finds the cluster value, which corresponds to a virtual cluster. Host device 100 is unaware that the cluster value corresponds to a non-physical cluster, and interprets the value as a legitimate cluster value.

At step 425, SD driver 140 transmits the read request to SD controller 250. SD driver converts the virtual cluster value to a virtual sector value, using a conversion of the form K*V+constant, and issues a read request to the virtual sector. As above, the parameter K is the number of sectors per cluster.

At step 430, SD controller 250 receives the read request. In response, SD controller 250 sends a command to SD application 290 including the virtual sector value, and returns the corresponding hidden sector value to host device 100, using the formula hidden_sector=virtual_sector (mod(K*M).

At step 435, application 290 receives the event from SD controller 250, and converts the sector value to a URL, or to another such pointer to a file on a remote server, using the download map. Application 290 then issues an HTTP GET command, or such other download command, to retrieve the remote file. This operation is performed only once, when the first sector of the file is read.

At step 440, SD driver 140 retrieves the stub data. Host device 100 is unaware that this data belongs to a stub file. The length matches the file length in the directory listing, to ensure consistency. The data is displayed to the user, and includes a message such as “file is currently being downloaded, download will be complete within xx seconds”. Generally, the message is refreshed by host device 100. In circumstances where host device 100 does not refresh, the SD card forces a refresh every 2-3 seconds by a refresh operation, or by a disconnect/connect operation using the SD protocol.

Referring to FIG. 5B, in this embodiment the place holder message “Please wait, file is downloading” from the stub file is played to the user. It will be appreciated by those skilled in the art the place holder messages may be displayed to a user as a still image or video clip, or played as an audio file, or both. In one embodiment, the place holder message is the same media type as the file that is corresponds to; i.e., audio messages are played when audio files are being downloaded, and video messages are played when video files are being downloaded.

Referring to FIG. 5C, the file being downloaded is stored in physical clusters 15, 16, 17, etc. This is reflected in the entry for the “benny goodman” file in the download map, where cluster 15 is designated.

Referring back to FIG. 4, in general at step 445 application 290 receives the real file content and stores it in the flash memory. The file is downloaded via communication modem 280. As it arrives, application 290 updates the download map for the file with the amount of data received, and updates the first cluster in the cluster chain for the file in the flash memory. Each cluster of the downloaded file is stored in a free cluster in the flash memory, which is then marked as full. Thus it will be appreciated by those skilled in the art that as the file is downloaded a regular file is generated in the FAT, but without a directory item for the file. Instead, the first sector of the file is stored in the download map.

At step 450 host device 100 refreshes the file list. At step 455 a determination is made whether or not the download for the file is complete. If not, processing returns to step 445 where application 290 continues to download the file. Otherwise, if the download is complete then, at step 460, application 290 marks the last cluster of the downloaded file with an EOF.

At step 465, application 290 points the first cluster of the file to the downloaded data cluster chain. Application 290 replaces the directory entry for the file from the virtual cluster value to the physical first cluster of the newly downloaded file. As such, the file entry now points to a legitimate file. The file size is also changed, so as to correspond to the received file length. The file is then removed from the download map.

Referring to FIG. 5D, when host device 100 refreshes, the user interface displays the new file, and the user listens to the real Benny Goodman song. The downloaded file is now stored in clusters 15-21, and cluster 21 is marked with an EOF. The downloaded file now appears as a local file in the “jazz” directory, and its entry is removed from the download map.

Reference is now made to FIG. 7, which is a simplified flowchart of a method for playing a streamed file from an SD card, in accordance with an embodiment of the present invention. At step 710, host device 100 accesses a media stub. At step 710 the stream data associated with the media stub begins downloading, and is dynamically stored in physical file clusters as it arrives, such as file clusters 7-9 in FIG. 3. Application 290 waits until sufficient data arrives to play a few seconds' worth of the media. Then, at step 730, application 290 links the downloaded file to the FAT. The file size is reported as being extremely long. At step 740, application 290 continues to write new clusters of data, as the stream if downloaded for several more seconds. At step 750, the FAT cluster link becomes circular, and application 290 loops back to the first stored cluster for the file.

In this regard, reference is now made to FIG. 8, which is an illustration of file streaming using a circular cluster cycle in the FAT, in accordance with an embodiment of the present invention. The cross-hatched clusters in FIG. 8 correspond to the FAT legend provided in FIG. 3.

Referring back to FIG. 7, at step 760 a determination is made whether or not the user has stopped listening to the stream. Such a determination may be made by application 290, by identifying a lack of access by host device 100 to the file clusters. If the user has not stopped listening to the stream, then processing returns to step 740 as more data is streamed. Otherwise, if the user has stopped listening to the stream then, at step 770, application 290 updates the FAT to point to a stub in the virtual memory, and frees up all clusters that have been designated for the streamed file.

In addition to downloading of remote files to SD card 210, application 290 may also upload files from SD card 210 to a remote server, and store them in a designated directory. Application 290 may create a directory named “uploads” under the root directory, when the file system of SD card 210 is initialized. The “uploads” directory is generated as a directory list stub in the virtual storage area, and includes a single data cluster. The “uploads” directory is initially set as an empty directory.

Reference is now made to FIG. 9, which is a simplified flowchart of a method for uploading a file from an SD card to a remote server, in accordance with an embodiment of the present invention. To accompany FIG. 9, reference is also made to FIGS. 10A and 10B, which are snapshots of a user interface and a file system for a simple example use case, during various stages of file upload during operation of the method of FIG. 9. FIG. 10A is divided into three portions. The leftmost portion illustrates a user interface, the middle portion illustrates directory entries and the upload map, and the rightmost portion illustrates the FAT. FIG. 10B is divided into two portions. The left portion illustrates directory entries and the upload map, and the right portion illustrates the FAT. Thus, whereas FIG. 9 describes the steps being performed, the accompanying FIGS. 10A and 10B illustrate states of the user interface and the file system during various ones of the steps. The legends for the cross-hatching on the FIGS. 10A and 10B are the same as the legend provided in FIG. 3. It will be appreciated by those skilled in the art that the file system illustrated in FIGS. 10A and 10B is simplified, in order to emphasize the workings of an embodiment of the present invention.

Referring to FIG. 9, in general at step 910, when host device 100 is instructed to upload a file to a remote server, it creates a new file in a virtual directory named “uploads”. At step 920, SD controller 250 identifies a write request to the “uploads” directory. SD controller may identify such request, since host device 100 issues the write request to a virtual cluster number. SD controller then sends an event to application 290.

At step 930, the host's write request is re-directed to a hidden sector that holds the “uploads” directory listing content. Application 290 recognizes that a new file is being created in the “uploads” directory, and it allows host device 100 to write the file content. At step 940 the file content is written to the file created in the “uploads” directory. The file itself is treated as a regular file in the file system.

FIG. 10A corresponds to a stage where the upload directory listing is displayed in the user interface, and a user has selected a file name “recording.mp3” for upload. As shown in FIG. 10A, the root directory has an entry for a stub uploads directory located at virtual cluster 36. The root directory also has an entry for the music file “recording.mp3”, which is stored at clusters 1-6.

FIG. 10B corresponds to a stage where the selected file is copied to the physical storage area, and the upload process begins. Referring to FIG. 10B, there is now an “uploads” directory with an entry for the file “recording.mp3” having first cluster 7.

At step 950, application 290 determines whether or not host device 100 has finished writing the file and has closed the file. If not, processing returns to step 940. If host device 100 has closed the file, then at step 960 application 290 initiates a communication session with the remote server, and at step 970 application 290 sends the file content to the remote server.

At step 980, application 290 determines whether or not the file has been successfully delivered to the remote server. If not, processing returns to step 970. If the file has been successfully delivered to the remote server, then at step 990 the file is removed from the file system and from the outgoing directory listing.

In reading the above description, persons skilled in the art will realize that there are many apparent variations that can be applied to the methods and systems described. In particular, it will be appreciated that the present invention applies to general file systems, and is not restricted to FAT file systems.

In the foregoing specification, the invention has been described with reference to specific exemplary embodiments thereof. It will, however, be evident that various modifications and changes may be made to the specific exemplary embodiments without departing from the broader spirit and scope of the invention as set forth in the appended claims. Accordingly, the specification and drawings are to be regarded in an illustrative rather than a restrictive sense. 

1. An enhanced flash memory card, comprising: a flash memory card, comprising: a wireless modem for downloading remote directory listings, and media files and streams over the Internet; and a memory partitioned into physical data storage clusters; and a driver for said flash memory card (i) for managing a file allocation table (FAT) that stores information about physical and virtual data storage clusters, the FAT including stub files for remote directory listings and remote media files and streams, wherein the stub files link to virtual data clusters, (ii) for managing a download conversion map from virtual cluster numbers to pointers of remote media files and streams, and (iii) for storing downloaded directory listings and media files and streams in the physical data storage clusters.
 2. The enhanced flash memory card of claim 1 wherein said driver is further functional (iv) for allocating a subset of said physical data storage clusters as hidden clusters that are not included in the FAT, and (v) for mapping a virtual data storage cluster into a hidden cluster, upon receipt of a command to read or write to the virtual data storage cluster.
 3. The enhanced flash memory card of claim 1 wherein the remote media files and streams are MP3 audio files and streams, respectively.
 4. The enhanced flash memory card of claim 1 wherein the remote media files and streams are MP4 video files and streams, respectively.
 5. A method for remote file access using flash memory, comprising: issuing a read request from a host device to a flash memory file system, the flash memory being represented as a plurality of physical and virtual data storage clusters, wherein the read request is addressed to a virtual data cluster; reading a stub file from a physical data cluster of the flash memory that corresponds to the virtual data cluster; identifying a URL that corresponds to the virtual data cluster; receiving remote file data from the URL; and storing the remote file data in physical data clusters of the flash memory.
 6. The method of claim 5 wherein the stub file contains a place holder message that is displayed while said receiving remote data is being performed.
 7. The method of claim 5 wherein the physical data cluster of the flash memory that corresponds to the virtual data cluster, is a hidden cluster which is not mapped to the flash memory file system.
 8. A method for file upload using flash memory, comprising: issuing a write request from a host device to a flash memory file system, the flash memory being represented as a plurality of physical and virtual data storage clusters, wherein the write request is to a directory represented as a stub file in the virtual storage; re-directing the write request to a physical cluster that holds an outgoing directory; writing the file content to a file created in the outgoing directory; sending the created file from the outgoing directory to a designated remote server; and removing the file from the physical storage and from being listed in the outgoing directory listing, after completion of said sending.
 9. A method for file management, comprising: implementing a file system that includes (i) visible physical sectors, (ii) hidden physical sectors, and (iii) virtual sectors, wherein visible physical sectors are mapped to the file system, hidden physical sectors are not mapped to the file system, and virtual sectors are not resident in a physical memory; mapping a virtual sector to a hidden sector in response to a read or a write command to the virtual sector, prior to performing the read or write command; and performing at least one auxiliary action in response to the read or a write command to the virtual sector.
 10. The method of claim 9 wherein the at least one auxiliary action in response to a read command is a file download.
 11. The method of claim 9 wherein the at least one auxiliary action in response to a write command is a file upload.
 12. The method of claim 9 wherein the write command includes a modem command for a communication modem, and the auxiliary action in response to the read command is issuing the modem command to the modem.
 13. The method of claim 12 further comprising writing a reply issued by the modem in response to the modem command, in a file of the file system.
 14. An enhanced flash memory card, comprising: a flash memory card, comprising: a memory; and a wireless modem for downloading remote directory listings, and media files and steams over the Internet; and a driver for said flash memory card for managing a system of files and directories in said memory, and for invoking an auxiliary action directed to said wireless modem, wherein the auxiliary action is associated with a designated directory.
 15. The enhanced flash memory card of claim 14 wherein the auxiliary action is a modem AT command, wherein the AT command is associated with a write command to a file within the designated directory, and wherein said driver copies text specified in the file write command for inclusion in the associated AT command.
 16. An enhanced flash memory card, comprising: a flash memory card, comprising: a memory; and a media player; and a driver for said flash memory card for managing a system of files and directories in said memory, and for invoking an auxiliary action directed to said media player, wherein the auxiliary action is associated with a designated directory.
 17. The enhanced flash memory card of claim 16 wherein the auxiliary action is a command for the media player, and wherein the media player command is associated with a command to open a file within the designated directory, and wherein the media player command corresponds to the name of the file.
 18. The enhanced flash memory card of claim 17 wherein the command for the media player is a play or a pause command.
 19. The enhanced flash memory card of claim 17 wherein the command for the media player is a forward search or a backward search command.
 20. The enhanced flash memory card of claim 17 wherein the command for the media player is a volume up or volume down command.
 21. A method for embedding a wireless modem in a flash memory card, comprising: managing a system of files and directories in a flash card memory storage; generating an AT modem command in response to receiving a write command to a file within a designated directory, comprising copying text specified in the file write command for inclusion in the associated AT command; and issuing the AT modem command for a wireless modem embedded within the flash card.
 22. A method for embedding a media player in a flash memory card, comprising: managing a system of files and directories in a flash card memory storage; generating a media player command in response to receiving a command to open a file within a designated directory, wherein the media player command corresponds to the name of the file; and issuing the media player modem command to a media player embedded within the flash card. 